package com.qcby.byc.demo0422.util;


import com.baomidou.mybatisplus.extension.plugins.pagination.Page;

/**
 * @className: PageVo
 * @description:
 * @author: lxt
 * @create: 2021-04-25 16:50
 **/
public class PageVo {
    private Object data;
    private long pageNum;
    private long pageSize;
    // 总条数
    private long pageTotal;
    // 总页数
    private long pageSum;

    public PageVo(Page<Object> page) {
        this.pageNum = page.getCurrent();
        this.pageSize = page.getSize();
        this.pageTotal = page.getTotal();
        this.pageSum = page.getPages();
        data = page.getRecords();
    }

    public Object getData() {
        return data;
    }

    public void setData(Object data) {
        this.data = data;
    }

    public long getPageNum() {
        return pageNum;
    }

    public void setPageNum(long pageNum) {
        this.pageNum = pageNum;
    }

    public long getPageSize() {
        return pageSize;
    }

    public void setPageSize(long pageSize) {
        this.pageSize = pageSize;
    }

    public long getPageTotal() {
        return pageTotal;
    }

    public void setPageTotal(long pageTotal) {
        this.pageTotal = pageTotal;
    }

    public long getPageSum() {
        return pageSum;
    }

    public void setPageSum(long pageSum) {
        this.pageSum = pageSum;
    }
}
